package com.buaa.pm.feign;

import com.alibaba.fastjson.JSONObject;
import com.buaa.pm.feign.fallback.ParagraphClientFallback;
import com.buaa.pm.model.dto.ParagraphRequestDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;


@FeignClient(name = "paragraph-extract", url = "192.168.0.185:8080",fallback = ParagraphClientFallback.class)
public interface ParagraphClient {

    @PostMapping(value = "/api/file/", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    JSONObject getParagraph(ParagraphRequestDTO paragraphRequestDTO);
}
